<?php

require_once __DIR__ . '/../vendor/autoload.php';

//$config = [];
//$config['namespace'] = 'testtesttesttest';
//$config['redis'] = [
//    'host'=>'4',
//    'port'=>6379,
//    'password'=>'e5dc',
//    'select'=>1,
//];
//$config['timeout'] = [];
//$config['timeout']['exec_max_seconds'] = 600;
//$config['timeout']['max_continue_times'] = 10;
//$config['timeout']['single_max_deal_seconds'] = 30;
//$hc = \MicroCyanHelper\Core\Factory::HttpCrontab($config);
//var_dump($hc->start(function (){},function (){}));
//exit();

$url = \MicroCyanHelper\Core\Factory::Tool([
    'ObjectStorage'=>[
        'type'=>'oss',
        'bucket'=>'makne',
        'endpoint'=>'httpsom',
        'credentials'=>[ 'key'=>'','secret'=>'' ],
        'url'=>'htom/'
    ],
])->object_storage->getObjects(['prefix'=>'']);
var_dump($url);
exit();

$url = \MicroCyanHelper\Core\Factory::Tool([
    'ObjectStorage'=>[
        'type'=>'oss',
        'bucket'=>'',
        'endpoint'=>'oss-cn-shanghai.aliyuncs.com',
        'credentials'=>[ 'key'=>'','secret'=>'' ],
        'url'=>''
    ],
])->object_storage->putObject('aasd.png','sdwq.png');
var_dump($url);
exit();
//
//exit();
//$a = \MicroCyanHelper\Core\Factory::KuaiTuanTuan([
//    'namespace'=>'kuai_tuan_tuan',
//    'redis'=>[
//        'host'=>'',
//        'port'=>6379,
//        'password'=>'',
//        'select'=>1,
//    ],
//    'http'=>[
//        'base_uri'=>'https://api.pinduoduo.com',
//        'xcx_version'=>'3.24.388'
//    ]
//]);


//print_r($a->filter->OrderList($a->getOrderList(['activity_no'=>'0iclrhp39-7pNNBMw4VR3dDW_vf2nlwg'])));



//exit();




exit();
$a = \MicroCyanHelper\Core\Factory::WechatRev([
    'namespace'=>'',
//    'redis'=>$predis,
    'redis'=>[
        'host'=>'',
        'port'=>6379,
        'password'=>'',
        'select'=>0,
    ],
    'http'=>[
        'base_uri'=>'http://103.470',
        'headers'=>[
            'accept'=>'text/plain',
            'Content-Type'=>'application/json'
        ]
    ],
    //WechatRev专属配置
    'username'=>'',
    'password'=>'',
    //HttpCrontab专属配置
    'timeout'=>[
        'exec_max_seconds'=>10*60,
        'max_continue_times'=>1000,
        'single_max_deal_seconds'=>30
    ]
]);

$token = '';
$proxy = '';

//获取消息列表
//$v = $a->getMessageSync([ 'token'=>$token, 'proxy'=>$proxy ]);
//print_r($v);

//获取个人资料
//$v = $a->getWxProfile([ 'token'=>$token, 'proxy'=>$proxy ],['withQrcode'=>true]);
//print_r($a->filter->WxProfile($v));

//获取朋友圈内容
$v = $a->getSnsPage([ 'token'=>$token, 'proxy'=>$proxy ],['wxId'=>'wxid_60f5jn0scap22']);
print_r($a->filter->snsPage($v));

//获取微信群信息
//$v = $a->getChatRoomDetail([ 'token'=>$token, 'proxy'=>$proxy ],['id'=>'21026240539@chatroom']);
//var_dump($v);

//获取微信群成员信息
//$v = $a->getChatRoomMemberDetail([ 'token'=>$token, 'proxy'=>$proxy ],['id'=>'21026240539@chatroom']);
//print_r($a->filter->ChatRoomMemberDetail($v));

//$v = $a->getGetProfileQrCode([ 'token'=>$token, 'proxy'=>$proxy ],['id'=>'wxid_60f5jn0scap22']);
//print_r($v);